
# 带参数的装饰器

def info(func):
    def wrapper(args):
        print("[INFO]:调用{}()".format(func.__name__))
        return func(args)
    return wrapper


@info
def say(args):
    print("你好,{}".format(args))


say("中国")
# say("中国","没过")

print("="*80)

def info1(func):
    def wrapper(*args,**kwargs):
        print("[INFO]:调用{}()".format(func.__name__))
        return func(*args,**kwargs)
    return wrapper

@info1
def say_chinese(args1):
    print("你好，{}".format(args1))

@info1
def todo(x,y,z,d):
    print(x+y+z+d)

say_chinese("中国")
todo(1,2,3,4)



